/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.brain.comp.manager;

import com.brain.comp.dto.PcDetaItemDto;
import com.brain.comp.dto.PedidoCompraDetaDto;
import com.brain.core.manager.*;
import com.brain.core.exception.DAOException;
import com.brain.core.hibernate.dao.DAOGenerico;
import java.io.Serializable;
import java.util.List;
import javax.annotation.Resource;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Service;

/**
 *
 * @author Indra
 */
@Service
public class PcDetaItemManager extends ComunManager<PcDetaItemDto> implements Serializable {

    private static Logger logger = Logger.getLogger(PcDetaItemManager.class);
    private Long idEntidad = 171L;
    @Resource
    private DAOGenerico<PcDetaItemDto> springHibernateDao;
    @Resource
    private RecursosManager recursosManager;

    /**
     * obtener PCDetaItem Deta por Id
     *
     * @param id ID de PCDetaItem
     * @return Pedido de Compra Deta
     * @throws DAOException
     */
    public PcDetaItemDto obtenerPorId(Long id) throws DAOException {
        return springHibernateDao.obtenerDtoPorId(PcDetaItemDto.class, id);
    }

   
    public void nuevoMuchos(List<PedidoCompraDetaDto> lista) throws DAOException {
        springHibernateDao.guardarColeccion(lista);
    }

    public void eliminarMuchos(List<PedidoCompraDetaDto> lista) throws DAOException {
        springHibernateDao.borrarColeccion(lista);
    }

    public static Logger getLogger() {
        return logger;
    }

    public static void setLogger(Logger logger) {
        PcDetaItemManager.logger = logger;
    }

    public Long getIdEntidad() {
        return idEntidad;
    }

    public void setIdEntidad(Long idEntidad) {
        this.idEntidad = idEntidad;
    }

    public DAOGenerico<PcDetaItemDto> getSpringHibernateDao() {
        return springHibernateDao;
    }

    public void setSpringHibernateDao(DAOGenerico<PcDetaItemDto> springHibernateDao) {
        this.springHibernateDao = springHibernateDao;
    }

    public RecursosManager getRecursosManager() {
        return recursosManager;
    }

    public void setRecursosManager(RecursosManager recursosManager) {
        this.recursosManager = recursosManager;
    }
}
